
// 时间选择器
//日期设置，不可选择今日之后的日期
$(function () {
	var now = new Date();
	var year = now.getFullYear();
	var month = now.getMonth() + 1 < 10 ? "0" + (now.getMonth() + 1)
		: (now.getMonth() + 1);
	var day = now.getDate() < 10 ? "0" + now.getDate() : now.getDate();
	$("#startCreatetime").attr("max", year + "-" + month + "-" + day);
	$("#endCreatetime").attr("max", year + "-" + month + "-" + day);
})

var oEditSaveBtn = document.querySelector('.editSaveBtn')
oEditSaveBtn.onclick = function () {
	if (event.target.className.includes('edit')) {
		//让编辑框显示
		$('#editModal').modal('show');
	}
}

// 
var aButton = document.querySelectorAll('.kind button')
console.log(aButton)
for (var i = 0; i < aButton.length; i++) {
	aButton[i].onclick = function () {
		for (var j = 0; j < aButton.length; j++) {
			//  aButton[j].classList.remove('active')
			aButton[j].className=''
		}

		this.classList.add('active')

	}
}